package com.example.day09;

import com.example.day07.Book;

import java.util.ArrayList;
import java.util.List;

public class ArrayListDetailsDemo {

    public static void main(String[] args) {
        List<Book> books=new ArrayList<>();

        Book b1=new Book(1,"java",100.0d);
        Book b2=new Book(2,"python",100.0d);
        Book b3=new Book(1,"java",220.0d);

        books.add(b1);
        books.add(b2);

        System.out.println(books.contains(b3));

        books.remove(b3);  //b3.equals(b1)
        System.out.println(books);

        List<Long>  longList=new ArrayList<>();
        longList.add(1L);
        longList.add(2L);
        longList.add(3L);
        longList.remove(2L);
        System.out.println(longList);




    }
}
